

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Split &mdash; BartPy 0.0.1 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Tree" href="tree.html" />
    <link rel="prev" title="Node" href="node.html" /> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> BartPy
          

          
          </a>

          
            
            
              <div class="version">
                0.0.1
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="node.html">Node</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Split</a></li>
<li class="toctree-l1"><a class="reference internal" href="tree.html">Tree</a></li>
<li class="toctree-l1"><a class="reference internal" href="model.html">Model</a></li>
<li class="toctree-l1"><a class="reference internal" href="sampling.html">Samplers</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">BartPy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>Split</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/split.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="module-bartpy.split">
<span id="split"></span><h1>Split<a class="headerlink" href="#module-bartpy.split" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="bartpy.split.SplitCondition">
<em class="property">class </em><code class="descclassname">bartpy.split.</code><code class="descname">SplitCondition</code><span class="sig-paren">(</span><em>splitting_variable: str</em>, <em>splitting_value: float</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/bartpy/split.html#SplitCondition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bartpy.split.SplitCondition" title="Permalink to this definition">¶</a></dt>
<dd><p>A representation of a split in feature space.
The two main components are:</p>
<blockquote>
<div><ul class="simple">
<li>splitting_variable: which variable is being split on</li>
<li><dl class="first docutils">
<dt>splitting_value: the value being split on</dt>
<dd>all values less than or equal to this go left, all values greater go right</dd>
</dl>
</li>
</ul>
</div></blockquote>
<dl class="method">
<dt id="bartpy.split.SplitCondition.condition">
<code class="descname">condition</code><span class="sig-paren">(</span><em>data: bartpy.data.Data</em>, <em>cached=True</em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="reference internal" href="_modules/bartpy/split.html#SplitCondition.condition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bartpy.split.SplitCondition.condition" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a Bool array indicating which side of the split each row of <cite>Data</cite> should go
False =&gt; Left
True =&gt; Right</p>
</dd></dl>

<dl class="method">
<dt id="bartpy.split.SplitCondition.left">
<code class="descname">left</code><span class="sig-paren">(</span><em>data: bartpy.data.Data</em><span class="sig-paren">)</span> &#x2192; typing.Tuple[_ForwardRef('SplitCondition'), numpy.ndarray]<a class="reference internal" href="_modules/bartpy/split.html#SplitCondition.left"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bartpy.split.SplitCondition.left" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a Bool array indicating whether each row should go into the left split.
Inverse of self.right</p>
</dd></dl>

<dl class="method">
<dt id="bartpy.split.SplitCondition.right">
<code class="descname">right</code><span class="sig-paren">(</span><em>data: bartpy.data.Data</em><span class="sig-paren">)</span> &#x2192; typing.Tuple[_ForwardRef('SplitCondition'), numpy.ndarray]<a class="reference internal" href="_modules/bartpy/split.html#SplitCondition.right"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bartpy.split.SplitCondition.right" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a Bool array indicating whether each row should go into the left split.
Inverse of self.right</p>
</dd></dl>

</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="tree.html" class="btn btn-neutral float-right" title="Tree" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="node.html" class="btn btn-neutral" title="Node" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2018, Jake Coltman.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'0.0.1',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>
      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>